import json from 'rollup-plugin-json';   //支持引用json文件
import resolve from "rollup-plugin-node-resolve";  //解析外部依赖包
import commonjs from "rollup-plugin-commonjs";  //将CommonJS模块转换为 ES2015 供 Rollup 处理
import babel from 'rollup-plugin-babel'
module.exports = {
    input:"src/v2/instance/index.js",
    output:[
        {
            file:"dist/v2/vue.esm.js",
            format:"es",
            sourcemap:true
        },
        {
            file:"dist/v2/vue.cjs.js",
            format:"cjs",
            sourcemap:true,
            name:"Vue"
        },
        {
            file:"dist/v2/vue.umd.js",
            format:"umd",
            sourcemap:true,
            name:"Vue"
        }
    ],
    plugins:[commonjs(),resolve(),json(),babel(
        {
            exclude:"node_modules/**"
        }
    )]
}